<ion-view view-title="{{user.loginname}}">
  <ion-nav-buttons side="right">
    <button ng-if="user.loginname == loginName" class="button button-clear" ng-click="logout()">退出</button>
  </ion-nav-buttons>
  <ion-content class="has-header user">
    <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()">
    </ion-refresher>
    <ion-list>
      <ion-item class="item-divider item-gap">
      </ion-item>
      <ion-item class="item-avatar">
        <img ng-src="{{user.avatar_url | protocol}}" ng-if="!settings.saverMode">
        <span>{{user.loginname}}</span>
        <span>{{user.score}}积分</span>
        <p>
        注册于：{{user.create_at | amDateFormat:'YYYY-MM-DD hh:mm:ss'}}
        </p>
      </ion-item>
      <ion-item class="item-divider">
        最近主题
      </ion-item>
      <ion-item ng-repeat="topic in user.recent_topics" href="#/topic/{{topic.id}}">
        <h2>{{topic.title}}</h2>
        <p>
          {{topic.author.loginname}}
          <span class="item-note" am-time-ago="topic.last_reply_at">
          </span>
        </p>
      </ion-item>
      <ion-item class="item-divider">
        最近回复
      </ion-item>
      <ion-item class="item-avatar" ng-repeat="topic in user.recent_replies" href="#/topic/{{topic.id}}">
        <img ng-src="{{topic.author.avatar_url | protocol}}" ng-if="!settings.saverMode">
        <h2>{{topic.title}}</h2>
        <p>
          {{topic.author.loginname}}
          <span class="item-note" am-time-ago="topic.last_reply_at">
          </span>
        </p>
      </ion-item>
    </ion-list>
  </ion-content>
</ion-view>
